#include <QDebug>

#include "testdatabasemanager.h"
#include "../database/databasemanager.h"

testDatabaseManager::testDatabaseManager()
{
    Jcr::DatabaseManager* dbMgr = Jcr::DatabaseManager::instance();
//    bool ret = dbMgr->addBrandModel("哈雷","StreetFighter 750");
//    qDebug() << __LINE__ << "ret: " << ret;
//    ret = dbMgr->addBrandModel("哈雷","883");
//    qDebug() << __LINE__ << "ret: " << ret;
//    ret = dbMgr->addBrandModel("哈雷","肥仔");
//    qDebug() << __LINE__ << "ret: " << ret;
//    ret = dbMgr->addBrandModel("哈雷","路王");
//    qDebug() << __LINE__ << "ret: " << ret;
//    ret = dbMgr->addBrandModel("川崎", "z800");
//    qDebug() << __LINE__ << "ret: " << ret;
//    ret = dbMgr->addBrandModel("川崎", "z1000");
//    qDebug() << __LINE__ << "ret: " << ret;
//    ret = dbMgr->addBrandModel("川崎", "Vulcan S");
//    qDebug() << __LINE__ << "ret: " << ret;

//    ret = dbMgr->addModelVideoLink("Monster 848", "https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=%E5%AD%98%E5%82%A8%E7%BD%91%E5%9D%80%E9%93%BE%E6%8E%A5sql&oq=sqlite%20%E5%8F%AF%E8%A7%86%E5%8C%96%E5%B7%A5%E5%85%B7&rsv_pq=e428afa3000080b6&rsv_t=e23fBw3O4tzGPUHTAgg1133Hu0Dtssx29a9ZHAsXRHkvnYZW57pC9%2Bqc1IE&rsv_enter=0&rsv_sug3=82&rsv_sug1=35&rsv_sug2=0&rsv_sug7=100&inputT=11010&rsv_sug4=11010");
//    qDebug() << __LINE__ << "ret: " << ret;

    QStringList params;
    for (int i = 0; i < 29; ++i)
        params << QString("Param %1").arg(i + 1);

//    qDebug() << dbMgr->brandName("A博士SB125T-27");
    dbMgr->addModelParams("test_model", params);

//    qDebug() << dbMgr->isBrandName("SACHS");

    params.clear();
    for (int i = 0; i < 29; ++i)
        params << QString("Updated Param %1").arg(i + 1);
    dbMgr->updateModelParams("test_model", params);

}


